package cn.gjculture.shopping.api.entity;

import lombok.Data;
import lombok.Getter;

import java.math.BigDecimal;

@Data
public class RoutingRule {
    private String routingRuleId;
    private String goodsId;
    private String supplierId;
    //1,实际付款金额，2.售卖价
    private Integer rootIn;
    //1,百分比，2，固定金额
    private Integer routeType;
    //固定金额或者百分比数
    private String value;
    private Merchant merchant;

    @Data
    public static class Routing{
        private String merNo;
        private BigDecimal value;
    }

     public enum RoutType{
        PERCENT(1),FIXED(2);

        @Getter
        private Integer value;

        RoutType(Integer value){
            this.value=value;
        }
    }

    public enum RootIn{
        ACTUAL_PRICE(1),SELLING_PRICE(2);

        @Getter
        private Integer value;

        RootIn(Integer value){
            this.value=value;
        }
    }

}
